
import java.util.*;
public class Test {
        public static void main(String[] args)
        {
                VehicleFactory f1=VehicleFactory.getVehicleFactory(VehicleFactory.LUXURY_VEHICLE);
                VehicleFactory f2=VehicleFactory.getVehicleFactory(VehicleFactory.NON_LUXURY_VEHICLE);
                
                ArrayList <Car> masini=new ArrayList();
                
                masini.add(f1.getCar());
                masini.add(f2.getCar());
                
                ArrayList <SUV> suvs=new ArrayList();
                suvs.add(f1.getSUV());
                suvs.add(f2.getSUV());
                
                System.out.println("Masinile sunt:");
                for(int i=0;i<masini.size();i++)
                {
                        System.out.println("Masina["+i+"]="+masini.get(i).getCarName()+" "+masini.get(i).getCarFeatures());
                }
                
                System.out.println("SUV-urile sunt");
                for(int i=0;i<suvs.size();i++)
                {
                        System.out.println("SUV["+i+"]="+suvs.get(i).getSUVName()+" "+suvs.get(i).getSUVFeatures());
                }
        }

}
